<div class="pageHeader">
	<form id="pagerForm" action="${ctx!}/admin/user/list" onsubmit="return navTabSearch(this)" method="post">
		<input type="hidden" name="pageNum" value="${datas.pageNumber!}" />
		<input type="hidden" name="numPerPage" value="${datas.pageSize!}" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>用户名：<input type="text" class="focus highlightText" name="user.username" value="${user.username!}" alt="用户名 向后模糊查找" /></td>
					<td>姓名：<input type="text" class="focus highlightText" name="user.name" value="${user.name!}" alt="姓名 向后模糊查找"/></td>
					<td>
						<select name="user.sex" >
							<option value="">性别</option>
							<option value="0"<#if user.sex?? && user.sex = '0'>selected="selected"</#if>>男</option>
							<option value="1"<#if user.sex?? && user.sex = '1'>selected="selected"</#if>>女</option>
						</select>
					</td>
					<td>
						<select name="user.type" >
							<option value="">用户类型</option>
							<option value="0"<#if user.type?? && user.type = '0'>selected="selected"</#if>>普通用户</option>
							<option value="1"<#if user.type?? && user.type = '1'>selected="selected"</#if>>管理员</option>
						</select>
					</td>
					<td>
						<select name="user.login_status" >
							<option value="">在线状态</option>
							<option value="0"<#if user.login_status?? && user.login_status = '0'>selected="selected"</#if>>离线</option>
							<option value="1"<#if user.login_status?? && user.login_status = '1'>selected="selected"</#if>>在线</option>
						</select>
					</td>
					<td>
						<select name="user.enable" >
							<option value="">启用状态</option>
							<option value="0"<#if user.enable?? && user.enable = '0'>selected="selected"</#if>>启用</option>
							<option value="1"<#if user.enable?? && user.enable = '1'>selected="selected"</#if>>停用</option>
						</select>
					</td>
					<td><div class="button"><div class="buttonContent"><button type="submit">查询</button></div></div></td>
				</tr>
			</table>
		</div>
	</form>
</div>

<div class="pageContent" style="padding:0px" >
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${ctx!}/admin/user/toModifyPage" target="dialog" mask="true" width="520" height="425"><span>新增用户</span></a></li>
			<li class="line">line</li>
			<li><a class="delete" href="${ctx!}/admin/user/deleteUser" target="selectedTodo" rel="ids" title="确认删除？"><span>批量删除</span></a></li>
			<li class="line">line</li>
			<li><a class="edit" href="${ctx!}/admin/user/resetPassword" target="selectedTodo" rel="ids" title="确认重置密码？"><span>设置密码</span></a></li>
		</ul>
	</div>

	<table class="table" layoutH="112">
		<thead>
			<tr>
				<th width="20" align="center" ><input type="checkbox" group="ids" class="checkboxCtrl" /></th>
				<th width="30" align="center" >序号</th>
				<th width="100" align="left" >用户名</th>
				<th width="80" align="left" >姓名</th>
				<th width="80" align="left" >昵称</th>
				<th width="40" align="center" >性别</th>
				<th width="80" align="center" >生日</th>
				<th width="150" align="left" >个人网站</th> 
				<th width="70" align="center" >用户类型</th>
				<th width="80" align="center" >创建时间</th>
				<th width="80" align="center" >更新时间</th>
				<th width="120" align="center" >最后登陆时间</th>
				<th width="80" align="center" >最后登陆IP</th>
				<th width="60" align="center" >在线状态</th>
				<th width="60" align="center" >帐号状态</th>
				<th width="50" align="center" >操作</th>
			</tr>
		</thead>
		<tbody>
			<#list datas.list as user>
			<tr target="sid_obj" rel="${user.id!}" ondblclick="migr.baseMoudleDblick(this)">
				<td><input type="checkbox" <#if user.username?? && user.username != "admin">name="ids" value="${user.id!}"<#else>disabled="disabled"</#if>/></td>
				<td>${user_index + (datas.pageSize*(datas.pageNumber-1)) + 1}</td>
				<td>${user.username!}</td>
				<td>${user.name!}</td>
				<td>${user.nickname!}</td>
				<td><#if user.sex == '0'> <div>男</div> <#else> <div>女</div> </#if></td>
				<td>${user.birthday!}</td>
				<td>${user.website!}</td>
				<td><#if user.type == '0'> <div>普通用户</div> <#else> <div>管理员</div> </#if></td>
				<td>${user.create_time?string("yyyy-MM-dd")!}</td>
				<td><#if user.update_time??>${user.update_time?string("yyyy-MM-dd")!}</#if></td>
				<td><#if user.last_login_time??>${user.last_login_time?string("yyyy-MM-dd HH:mm")!}</#if></td>
				<td>${user.last_login_ip!}</td>
				<td><#if user.login_status == '0'> <div>离线</div> <#else> <div style="color:green">在线</div> </#if></td>
				<td><#if user.enable == '0'> <div>启用</div> <#else> <div style="color:red">停用</div> </#if></td>
				<td>
					<#if user.username?? && user.username != "admin">
						<a href="${ctx!}/admin/user/toModifyPage/${user.id!}" target="dialog" title="更新用户" rel="modifyUserDialog" mask=true width="520" height="425" style="color:#3C7FB1">编辑</a>
					</#if>
				</td>
			</tr>
			</#list>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span> <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20"<#if datas.pageSize == 20> selected</#if>>20</option>
				<option value="50"<#if datas.pageSize == 50> selected</#if>>50</option>
				<option value="100"<#if datas.pageSize == 100> selected</#if>>100</option>
				<option value="200"<#if datas.pageSize == 200> selected</#if>>200</option>
			</select> <span>条，共<font style="color:red;font-weight:bold;">${datas.totalRow!}</font>条，共<font style="color:red;font-weight:bold;">${datas.totalPage!}</font>页&nbsp;&nbsp;&nbsp;&nbsp;</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="${datas.totalRow!}" numPerPage="${datas.pageSize!}" pageNumShown="10" currentPage="${datas.pageNumber!}"></div>
	</div>
</div>

